/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package comandaXM.utils;

import javax.swing.JOptionPane;

/**
 *
 * @author xmarti
 */
public class JOPtionPaneXM {
    
    public boolean ConfirmRemove(){
        return JOptionPane.showConfirmDialog(null, TDSLanguageUtils.getMessage("JOptionPane.message.remove"),TDSLanguageUtils.getMessage("jOptionPane.tittle.confirm"),JOptionPane.YES_NO_OPTION)==0; 
    }
    public boolean ConfirmDownOperation() {
        return JOptionPane.showConfirmDialog(null, TDSLanguageUtils.getMessage("JOptionPane.message.down.operation"),TDSLanguageUtils.getMessage("jOptionPane.tittle.confirm"), JOptionPane.YES_NO_OPTION)==0; 
    }    
    public boolean ConfirmUpOperation() {
        return JOptionPane.showConfirmDialog(null, TDSLanguageUtils.getMessage("JOptionPane.message.up.operation"),TDSLanguageUtils.getMessage("jOptionPane.tittle.confirm"), JOptionPane.YES_NO_OPTION)==0; 
    }    
    public void errMessagge(String message) {
        JOptionPane.showMessageDialog(null, message,TDSLanguageUtils.getMessage("jOptionPane.tittle.confirm"), JOptionPane.ERROR_MESSAGE); 
    }    
    public void setOperationSave(){
        JOptionPane.showMessageDialog(null, TDSLanguageUtils.getMessage("jOptionPane.message.saved"),TDSLanguageUtils.getMessage("jOptionPane.tittle.setOperation"), JOptionPane.INFORMATION_MESSAGE); 
    }
    public void setOperationInsert(){
        JOptionPane.showMessageDialog(null, TDSLanguageUtils.getMessage("jOptionPane.message.insert"),TDSLanguageUtils.getMessage("jOptionPane.tittle.setOperation"), JOptionPane.OK_OPTION); 
    }
    public boolean ConfirmMessage(String message){
        return JOptionPane.showConfirmDialog(null, message,TDSLanguageUtils.getMessage("jOptionPane.tittle.confirm"),JOptionPane.YES_NO_OPTION)==0; 
    }
}
